//
// Created by Hjp22 on 25-7-18.
//

#ifndef PID_MOTOR_H
#define PID_MOTOR_H

#include "main.h"
typedef struct
{
    float target_val;   //目标值
    float err;          //偏差值
    float err_last;     //上一个偏差值
    float Kp,Ki,Kd;     //比例、积分、微分系数
    float integral;     //积分值
    float output_val;   //输出值
}PID_Motor;
float PID_realize(float actual_val);

#endif //PID_MOTOR_H
